#ifndef _FAN_HPP_
#define _FAN_HPP_

#include <string>
#include <vector>
#include <fan-llvm/SysPod.h>


/**
 * Fantom runtime command line tool.
 */
class Fan
{
public:
  Fan(const std::vector<std::pair<std::string, std::string> >& envVars);
  int run(const std::vector<std::string>& programArgs);
  int execute(const std::string& target, const std::vector<std::string>& targetArgs);
  int executeFile(const std::string& filename, const std::vector<std::string>& targetArgs);
  int executeType(const std::string& target, const std::vector<std::string>& targetArgs);

private:
  static int callMain(Type* t, Method* m);
  static void version(const std::string& progName);
  static void pods(const std::string& progName);
  static void help();

  std::vector<std::pair<std::string, std::string> > _envVars;
};


#endif
